﻿using Domain.Entities;
using Domain.IRepositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Application.ConfigApp
{
    public class ConfigAppService : IConfigAppService
    {

        //用户管理仓储接口
        private readonly IConfigRepository _repository;

        /// <summary>
        /// 构造函数 实现依赖注入
        /// </summary>
        /// <param name="ConfigRepository">仓储对象</param>
        public ConfigAppService(IConfigRepository ConfigRepository)
        {
            _repository = ConfigRepository;
        }

        public Config GetByName(string configname)
        {
            return _repository.GetByName(configname);
        }

        public bool AddOrUpdate(Config model)
        {
            return _repository.AddOrUpdate(model);
        }
    }
}
